/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package fwdisp.net.events;

import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.net.Socket;
import java.net.UnknownHostException;
import network.events.Event;
import network.version.VersionInfo;

/**
 *
 * @author rbs
 */
public class EventClient {

    public EventClient(String ip, Event event) throws UnknownHostException, IOException, ClassNotFoundException {
        Socket client = new Socket(ip, 112001);
        ObjectOutputStream output = new ObjectOutputStream(client.getOutputStream());
        ObjectInputStream input = new ObjectInputStream(client.getInputStream());
        
        
        VersionInfo info = (VersionInfo) input.readObject();
        output.writeObject(event);
        
    }

}
